import threading as td
import time

def job():
    with open(r'C:\Users\Administrator\Desktop\ccaac.txt','w') as book:
        for i in range(10000):
            book.write('%s\n' % i)

def start():
    t1 = td.Thread(target=job)
    t1.start()
    t1.join()

if __name__ == '__main__':
    time1 = time.time()
    start()
    time2 = time.time()
    print(time2 - time1)